namespace ghost {
	/**主角基础数据，此游戏这类没什么用*/
	export class MyPlayerData {
		private static _instance:MyPlayerData;		
		public static getInstance():MyPlayerData
		{			
			return MyPlayerData._instance == null?new MyPlayerData:MyPlayerData._instance;
		}
		public gold:number;
		public roleCfg:any;
		public constructor() {			
			let s = this;
			s.gold = 0;
			MyPlayerData._instance = s;
			s.roleCfg = {
				id:"x",
				roleID:"1",
				roleType:RoleType.PLAYER,				
				smart:"autoShoot",
				skin:{
					skinType:2,
					clothes:"1",
					action:"1"
				}
			};	

		}
		public addGold(val:number):void
		{
			let s = this;
			let gold:number;
			if(val == 0)return;
			gold = s.gold;
			s.gold = gold + val;
			GameDispatcher.instance.event(GameEvent.GOLD_CHANGE, [s.gold, gold]);
		}
		
	}
}